<!DOCTYPE html><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<meta charset="utf-8">
<title>NetopeerWebGUI » \FIT\NetopeerBundle\Controller\AjaxController</title>
<meta name="author" content="Mike van Riel">
<meta name="description" content="">
<link href="../css/template.css" rel="stylesheet" media="all">
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner"><div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">NetopeerWebGUI</a><div class="nav-collapse"><ul class="nav">
<li class="dropdown">
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
                                    API Documentation <b class="caret"></b></a><ul class="dropdown-menu">
<li><a>Namespaces</a></li>
<li><a href="../namespaces/FIT.html"><i class="icon-th"></i> FIT</a></li>
<li><a href="../namespaces/global.html"><i class="icon-th"></i> global</a></li>
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
                                    Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
                                    Reports <b class="caret"></b></a><ul class="dropdown-menu">
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
                <span class="label label-info">18</span></a></li>
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
                <ul><li>todo 
                <span class="label label-info">5</span>
</li></ul></a></li>
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
                <span class="label label-info">0</span></a></li>
</ul>
</li>
</ul></div>
</div></div>
<div class="go_to_top"><a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a></div>
</div>
<div id="___" class="container">
<noscript><div class="alert alert-warning">
                            Javascript is disabled; several features are only available
                            if Javascript is enabled.
                        </div></noscript>
<div class="row">
<div class="span4">
<span class="btn-group visibility" data-toggle="buttons-checkbox"><button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button></span><div class="btn-group view pull-right" data-toggle="buttons-radio">
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
</div>
<ul class="side-nav nav nav-list">
<li class="nav-header">
<i class="icon-custom icon-method"></i> Methods
                    <ul>
<li class="method public inherited"><a href="#method___construct" title="__construct :: constructor, which instantiate empty class variables"><span class="description">constructor, which instantiate empty class variables</span><pre>__construct()</pre></a></li>
<li class="method public "><a href="#method_addFromHistoryToProfilesAction" title="addFromHistoryToProfilesAction :: Add device from history to profiles"><span class="description">Add device from history to profiles</span><pre>addFromHistoryToProfilesAction()</pre></a></li>
<li class="method public "><a href="#method_connectedDeviceAttrAction" title="connectedDeviceAttrAction :: Get connected device attributes."><span class="description">Get connected device attributes.</span><pre>connectedDeviceAttrAction()</pre></a></li>
<li class="method public "><a href="#method_getSchemaAction" title="getSchemaAction :: Change session value for showing single or double column layout"><span class="description">Change session value for showing single or double column layout</span><pre>getSchemaAction()</pre></a></li>
<li class="method public "><a href="#method_getSchemaStatusAction" title="getSchemaStatusAction :: Get status of get-schema operation"><span class="description">Get status of get-schema operation</span><pre>getSchemaStatusAction()</pre></a></li>
<li class="method public "><a href="#method_historyOfConnectedDevicesAction" title="historyOfConnectedDevicesAction :: Get history of connected devices"><span class="description">Get history of connected devices</span><pre>historyOfConnectedDevicesAction()</pre></a></li>
<li class="method public "><a href="#method_profilesOfConnectedDevicesAction" title="profilesOfConnectedDevicesAction :: Get saved profiles of connected devices"><span class="description">Get saved profiles of connected devices</span><pre>profilesOfConnectedDevicesAction()</pre></a></li>
<li class="method public "><a href="#method_removeFromHistoryOrProfileAction" title="removeFromHistoryOrProfileAction :: Remove device from history or profile"><span class="description">Remove device from history or profile</span><pre>removeFromHistoryOrProfileAction()</pre></a></li>
<li class="method public inherited"><a href="#method_setActiveSectionKey" title="setActiveSectionKey :: sets current section key"><span class="description">sets current section key</span><pre>setActiveSectionKey()</pre></a></li>
<li class="method public inherited"><a href="#method_setSubmenuUrl" title="setSubmenuUrl :: sets submenu URL."><span class="description">sets submenu URL.</span><pre>setSubmenuUrl()</pre></a></li>
</ul>
</li>
<li class="nav-header protected">» Protected
                    <ul>
<li class="method protected inherited"><a href="#method_assign" title="assign :: Assignees variable to array, which will be send to template"><span class="description">Assignees variable to array, which will be send to template</span><pre>assign()</pre></a></li>
<li class="method protected inherited"><a href="#method_getTwigArr" title="getTwigArr :: Prepares variables to template, sort flashes and prepare menu"><span class="description">Prepares variables to template, sort flashes and prepare menu</span><pre>getTwigArr()</pre></a></li>
</ul>
</li>
<li class="nav-header private">» Private
                    <ul>
<li class="method private "><a href="#method_getschema" title="getschema :: Get one model and process it."><span class="description">Get one model and process it.</span><pre>getschema()</pre></a></li>
<li class="method private "><a href="#method_processSchema" title="processSchema :: Process &lt;get-schema&gt; action based on schparams."><span class="description">Process &lt;get-schema&gt; action based on schparams.</span><pre>processSchema()</pre></a></li>
<li class="method private "><a href="#method_updateLocalModels" title="updateLocalModels :: Get available configuration data models,
store them and transform them."><span class="description">Get available configuration data models,
store them and transform them.</span><pre>updateLocalModels()</pre></a></li>
</ul>
</li>
<li class="nav-header">
<i class="icon-custom icon-property"></i> Properties
                    <ul></ul>
</li>
<li class="nav-header private">» Private
                    <ul>
<li class="property private inherited"><a href="#property_activeSectionKey" title="$activeSectionKey :: "><span class="description">Active section key</span><pre>$activeSectionKey</pre></a></li>
<li class="property private inherited"><a href="#property_submenuUrl" title="$submenuUrl :: "><span class="description">url of submenu</span><pre>$submenuUrl</pre></a></li>
<li class="property private inherited"><a href="#property_twigArr" title="$twigArr :: "><span class="description">array of all variables assigned into template</span><pre>$twigArr</pre></a></li>
</ul>
</li>
</ul>
</div>
<div class="span8">
<a id="\FIT\NetopeerBundle\Controller\AjaxController"></a><ul class="breadcrumb">
<li>
<a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
</li>
<li><a href="../namespaces/FIT.html">FIT</a></li>
<li>
<span class="divider">\</span><a href="../namespaces/FIT.NetopeerBundle.html">NetopeerBundle</a>
</li>
<li>
<span class="divider">\</span><a href="../namespaces/FIT.NetopeerBundle.Controller.html">Controller</a>
</li>
<li class="active">
<span class="divider">\</span><a href="../classes/FIT.NetopeerBundle.Controller.AjaxController.html">AjaxController</a>
</li>
</ul>
<div class="element class">
<p class="short_description">Controller which handles all Ajax actions</p>
<div class="details">
<div class="long_description"><p>Defines common functions for all controllers, such as assigning template variables etc.</p></div>
<h3>
<i class="icon-custom icon-method"></i> Methods</h3>
<a id="method___construct"></a><div class="element clickable method public method___construct" data-toggle="collapse" data-target=".method___construct .collapse">
<h2>constructor, which instantiate empty class variables</h2>
<pre>__construct() </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\FIT\NetopeerBundle\Controller\BaseController::__construct()</td>
</tr></table>
</div></div>
</div>
<a id="method_addFromHistoryToProfilesAction"></a><div class="element clickable method public method_addFromHistoryToProfilesAction" data-toggle="collapse" data-target=".method_addFromHistoryToProfilesAction .collapse">
<h2>Add device from history to profiles</h2>
<pre>addFromHistoryToProfilesAction(int $connectionId) : \Symfony\Component\HttpFoundation\Response</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>Route</th>
<td>("/ajax/add-device-to-profiles/{connectionId}", name="addFromHistoryToProfiles")</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$connectionId</h4>
<code>int</code><p>ID of connection</p></div>
<h3>Returns</h3>
<div class="subelement response"><code>\Symfony\Component\HttpFoundation\Response</code></div>
</div></div>
</div>
<a id="method_connectedDeviceAttrAction"></a><div class="element clickable method public method_connectedDeviceAttrAction" data-toggle="collapse" data-target=".method_connectedDeviceAttrAction .collapse">
<h2>Get connected device attributes.</h2>
<pre>connectedDeviceAttrAction($connectedDeviceId) : array | bool</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>Route</th>
<td>("/ajax/get-connected-device-attr/{connectedDeviceId}/", name="connectedDeviceAttr")</td>
</tr>
<tr>
<th>Template</th>
<td>()</td>
</tr>
<tr>
<th>var</th>
<td></td>
</tr>
</table>
<h3>Parameters</h3>
<div class="subelement argument"><h4>$connectedDeviceId</h4></div>
<h3>Returns</h3>
<div class="subelement response">
<code>array</code><code>bool</code>$result</div>
</div></div>
</div>
<a id="method_getSchemaAction"></a><div class="element clickable method public method_getSchemaAction" data-toggle="collapse" data-target=".method_getSchemaAction .collapse">
<h2>Change session value for showing single or double column layout</h2>
<pre>getSchemaAction(int $key) : \Symfony\Component\HttpFoundation\Response</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>Route</th>
<td>("/ajax/get-schema/{key}", name="getSchema")</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$key</h4>
<code>int</code><p>session key of current connection</p></div>
<h3>Returns</h3>
<div class="subelement response"><code>\Symfony\Component\HttpFoundation\Response</code></div>
</div></div>
</div>
<a id="method_getSchemaStatusAction"></a><div class="element clickable method public method_getSchemaStatusAction" data-toggle="collapse" data-target=".method_getSchemaStatusAction .collapse">
<h2>Get status of get-schema operation</h2>
<pre>getSchemaStatusAction(int $key, array $result) : \Symfony\Component\HttpFoundation\Response</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>Route</th>
<td>("/ajax/get-schema-status/{key}", name="getSchemaStatus")</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$key</h4>
<code>int</code><p>session key of current connection</p></div>
<div class="subelement argument">
<h4>$result</h4>
<code>array</code>
</div>
<h3>Returns</h3>
<div class="subelement response"><code>\Symfony\Component\HttpFoundation\Response</code></div>
</div></div>
</div>
<a id="method_historyOfConnectedDevicesAction"></a><div class="element clickable method public method_historyOfConnectedDevicesAction" data-toggle="collapse" data-target=".method_historyOfConnectedDevicesAction .collapse">
<h2>Get history of connected devices</h2>
<pre>historyOfConnectedDevicesAction() : array</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>Route</th>
<td>("/ajax/get-connected-devices/", name="historyOfConnectedDevices")</td>
</tr>
<tr>
<th>Template</th>
<td>()</td>
</tr>
</table>
<h3>Returns</h3>
<div class="subelement response">
<code>array</code>$result</div>
</div></div>
</div>
<a id="method_profilesOfConnectedDevicesAction"></a><div class="element clickable method public method_profilesOfConnectedDevicesAction" data-toggle="collapse" data-target=".method_profilesOfConnectedDevicesAction .collapse">
<h2>Get saved profiles of connected devices</h2>
<pre>profilesOfConnectedDevicesAction() : array</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>Route</th>
<td>("/ajax/get-profiles/", name="profilesOfConnectedDevices")</td>
</tr>
<tr>
<th>Template</th>
<td>("FITNetopeerBundle:Ajax:historyOfConnectedDevices.html.twig")</td>
</tr>
</table>
<h3>Returns</h3>
<div class="subelement response">
<code>array</code>$result</div>
</div></div>
</div>
<a id="method_removeFromHistoryOrProfileAction"></a><div class="element clickable method public method_removeFromHistoryOrProfileAction" data-toggle="collapse" data-target=".method_removeFromHistoryOrProfileAction .collapse">
<h2>Remove device from history or profile</h2>
<pre>removeFromHistoryOrProfileAction(int $connectionId) : \Symfony\Component\HttpFoundation\Response</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>Route</th>
<td>("/ajax/remove-device/{connectionId}", name="removeFromHistoryOrProfile")</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$connectionId</h4>
<code>int</code><p>ID of connection</p></div>
<h3>Returns</h3>
<div class="subelement response"><code>\Symfony\Component\HttpFoundation\Response</code></div>
</div></div>
</div>
<a id="method_setActiveSectionKey"></a><div class="element clickable method public method_setActiveSectionKey" data-toggle="collapse" data-target=".method_setActiveSectionKey .collapse">
<h2>sets current section key</h2>
<pre>setActiveSectionKey(int $key) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\FIT\NetopeerBundle\Controller\BaseController::setActiveSectionKey()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$key</h4>
<code>int</code><p>key of connected server</p></div>
</div></div>
</div>
<a id="method_setSubmenuUrl"></a><div class="element clickable method public method_setSubmenuUrl" data-toggle="collapse" data-target=".method_setSubmenuUrl .collapse">
<h2>sets submenu URL.</h2>
<pre>setSubmenuUrl(string $submenuUrl) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\FIT\NetopeerBundle\Controller\BaseController::setSubmenuUrl()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$submenuUrl</h4>
<code>string</code><p>URL for submenu</p></div>
</div></div>
</div>
<a id="method_assign"></a><div class="element clickable method protected method_assign" data-toggle="collapse" data-target=".method_assign .collapse">
<h2>Assignees variable to array, which will be send to template</h2>
<pre>assign(mixed $key, mixed $value) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\FIT\NetopeerBundle\Controller\BaseController::assign()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$key</h4>
<code>mixed</code><p>key of the associative array</p></div>
<div class="subelement argument">
<h4>$value</h4>
<code>mixed</code><p>value of the associative array</p></div>
</div></div>
</div>
<a id="method_getTwigArr"></a><div class="element clickable method protected method_getTwigArr" data-toggle="collapse" data-target=".method_getTwigArr .collapse">
<h2>Prepares variables to template, sort flashes and prepare menu</h2>
<pre>getTwigArr() : array</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\FIT\NetopeerBundle\Controller\BaseController::getTwigArr()</td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>array</code>array of assigned variables to template</div>
</div></div>
</div>
<a id="method_getschema"></a><div class="element clickable method private method_getschema" data-toggle="collapse" data-target=".method_getschema .collapse">
<h2>Get one model and process it.</h2>
<pre>getschema(array $schparams, string $identifier) : int</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$schparams</h4>
<code>array</code><p>&$schparams  key, identifier, version, format for get-schema</p>
</div>
<div class="subelement argument">
<h4>$identifier</h4>
<code>string</code><p>identifier of folder in /tmp/symfony directory</p>
</div>
<h3>Returns</h3>
<div class="subelement response">
<code>int</code>0 on success, 1 on error</div>
</div></div>
</div>
<a id="method_processSchema"></a><div class="element clickable method private method_processSchema" data-toggle="collapse" data-target=".method_processSchema .collapse">
<h2>Process &lt;get-schema&gt; action based on schparams.</h2>
<pre>processSchema(array $schparams) : int</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$schparams</h4>
<code>array</code><p>&$schparams   get-schema parameters</p>
</div>
<h3>Returns</h3>
<div class="subelement response">
<code>int</code>0 on success, 1 on error</div>
</div></div>
</div>
<a id="method_updateLocalModels"></a><div class="element clickable method private method_updateLocalModels" data-toggle="collapse" data-target=".method_updateLocalModels .collapse">
<h2>Get available configuration data models,
store them and transform them.</h2>
<pre>updateLocalModels(int $key) : void</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$key</h4>
<code>int</code><p>index of session-connection</p>
</div>
</div></div>
</div>
<h3>
<i class="icon-custom icon-property"></i> Properties</h3>
<a id="property_activeSectionKey"> </a><div class="element clickable property private property_activeSectionKey" data-toggle="collapse" data-target=".property_activeSectionKey .collapse">
<h2>Active section key</h2>
<pre>$activeSectionKey : int</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\FIT\NetopeerBundle\Controller\BaseController::$$activeSectionKey</td>
</tr></table>
</div></div>
</div>
<a id="property_submenuUrl"> </a><div class="element clickable property private property_submenuUrl" data-toggle="collapse" data-target=".property_submenuUrl .collapse">
<h2>url of submenu</h2>
<pre>$submenuUrl : string</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\FIT\NetopeerBundle\Controller\BaseController::$$submenuUrl</td>
</tr></table>
</div></div>
</div>
<a id="property_twigArr"> </a><div class="element clickable property private property_twigArr" data-toggle="collapse" data-target=".property_twigArr .collapse">
<h2>array of all variables assigned into template</h2>
<pre>$twigArr : array</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\FIT\NetopeerBundle\Controller\BaseController::$$twigArr</td>
</tr></table>
</div></div>
</div>
</div>
</div>
</div>
</div>
<div class="row"><footer class="span12">
            Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
            Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a12</a> and<br>
            generated on 2013-05-03T20:04:46+02:00.<br></footer></div>
</div>
</body>
</html>
